package wps.component {
import flash.events.Event;
import flash.geom.Point;

import mx.binding.utils.ChangeWatcher;
import mx.collections.ArrayCollection;
import mx.graphics.BitmapFillMode;
import mx.graphics.BitmapScaleMode;

import spark.components.Image;

public class DrawingImage extends Image implements IDrawingElement {
	
	private var _settingFilters:ArrayCollection;

    //--------------------------------------------------------------------------
    //
    // Methods
    //
    //--------------------------------------------------------------------------

    public function get excludedSetting():Array {
		var ac:ArrayCollection = new ArrayCollection();
		ac.addItem("fontFamily");
		ac.addItem("fontSize");
		ac.addItem("fontStyle");
		ac.addItem("fontWeight");
		ac.addItem("textDecoration");
		ac.addItem("color");
		return ac.toArray();
    }

	[Bindable("elementRotate")]
	public function get elementRotation():Number {
		return rotation;
	}
	
	public function set elementRotation(value:Number):void {
		dispatchEvent(new Event("elementRotate"));
	}
	
	[Bindable]
	public function get settingFilters():ArrayCollection {
		return _settingFilters;
	}
	
	public function set settingFilters(settingFilters:ArrayCollection):void {
		_settingFilters = settingFilters;
	}
	
	// 使得scaleMode可以绑定
	[Bindable]
	override public function get scaleMode():String {
		return super.scaleMode;
	}
	
	override public function set scaleMode(value:String):void {
		super.scaleMode = value;
	}

    //--------------------------------------------------------------------------
    //
    // Constructor
    //
    //--------------------------------------------------------------------------

    public function DrawingImage() {
        super();

        fillMode = BitmapFillMode.SCALE;
    }

}
}
